import request from "@/utils/request";

// 员工列表
export function employeeListApi(params) {
  return request({
    url: "/user/list",
    method: "GET",
    params,
  });
}

// 新增员工
export function addemployeeApi(data) {
  return request({
    url: "/user/addUser",
    method: "POST",
    data,
  });
}

// 查询员工信息
export function employeeDetailApi(id) {
  return request({
    url: `/user/selUser/${id}`,
    method: "GET",
  });
}

// 删除员工信息
export function removeEmployeeApi(id) {
  return request({
    url: `/user/delUser/${id}`,
    method: "DELETE",
  });
}

// 修改员工状态
export function employeeStatusApi(id) {
  return request({
    url: `/user/updateUserStatus/${id}`,
    method: "PUT",
  });
}

// 修改员工信息
export function employeeUpdateApi(data,id) {
  return request({
    url: `/user/updateUser/${id}`,
    method: "PUT",
    data,
  });
}
